﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BusinessLayer.BLServerReference;
namespace WebFrontEnd.Helpers
{
    public static class GuestExtensions
    {
        public static string CombinedName(this Guest guest)
        {
            if (guest.Couple)
            {
                return guest.MaleFirstName + " & " + guest.FemaleFirstName + " " + guest.LastName;
            }
            else if (guest.MaleFirstName != null)
            {
                return guest.MaleFirstName + " " + guest.LastName;
            }
            else
            {
                return guest.FemaleFirstName + " " + guest.LastName;
            }            
        }

        public static string AddressDisplay(this Guest guest)
        {
            return guest.HouseNumber + " Apt. " + guest.ApartmentNumber + " " + guest.Street + ", " + guest.City.Name;
        }
    }
}